<%@ Page Title="Revert draggable position" Language="C#" MasterPageFile="~/Demo.master"
    Inherits="DemoPage" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <style type="text/css">
        .draggable, .draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
        .droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
    </style>
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Return the draggable (or it's helper) to its original location when dragging stops
        with the boolean <b>Revert</b> property set on the draggable control.
    </div>
    <br />
    <asp:Panel ID="DraggablePanel" runat="server" CssClass="ui-widget-content draggable">
        <p>
            I revert when I'm dropped</p>
    </asp:Panel>
    <asp:Panel ID="DraggablePanel1" runat="server" CssClass="ui-widget-header draggable2">
        <p>
            I revert when I'm not dropped</p>
    </asp:Panel>
    <asp:Panel ID="DroppablePanel" runat="server" CssClass="ui-widget-header droppable">
        <p>
            Drop me here</p>
    </asp:Panel>
    <DotNetAge:Draggable ID="Draggable1" runat="server" Revert="Valid">
        <Target TargetID="DraggablePanel" />
    </DotNetAge:Draggable>
    <DotNetAge:Draggable ID="Draggable2" runat="server" Revert="Invalid">
        <Target TargetID="DraggablePanel1" />
    </DotNetAge:Draggable>
    <DotNetAge:Droppable ID="Droppable1" runat="server" OnClientDrop="$(this).addClass('ui-state-highlight').find('p').html('Dropped!');">
        <Target TargetID="DroppablePanel" />
    </DotNetAge:Droppable>
    <div style="clear: left;">
    </div>
    <br />
    <demo:Code runat="server" ID="codeView" SourceFile="~/Droppable/Codes/Revert.aspx" />
</asp:Content>
